package com.lindroy.androidplayer.logic.model

/**
 * @author Lin
 * @date 2022/1/13
 * @function
 */
data class PageDataModel<T>(
    var datas: ArrayList<T> = arrayListOf(),
    var curPage: Int = 0,
    var offset: Int = 0,
    var over: Boolean = false,
    var pageCount: Int = 0,
    var size: Int = 0,
    var total: Int = 0
) {
    /**
     * 数据是否为空
     */
    fun isEmpty() = datas.isEmpty()

    /**
     * 是否为刷新
     */
    fun isRefresh() = offset == 0

    /**
     * 是否还有更多数据
     */
    fun hasMore() = !over
}
